home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Assembly / Mac68k / MANUAL / MAN9.DOC < prev   
Encoding:
Text File  |  1985-08-11  |  10.5 KB  |  448 lines  |  [TEXT/Anon]

  1.  
  2.                                                                 MAC.68K
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                OPTION
  10.                                OPTION
  11.                                OPTION
  12.  
  13.  
  14.  
  15.  
  16.  
  17.   PURPOSE         To set or change assembly options.
  18.  
  19.  
  20.  
  21.  
  22.  
  23.   FORMAT               OPTION  opt1,opt2,...opt3
  24.  
  25.  
  26.  
  27.  
  28.  
  29.   DESCRIPTION     OPTION is an initialization directive. It must
  30.  
  31.  
  32.                appear after the IDENT card but before any
  33.  
  34.  
  35.                noninitialization operation codes. The option
  36.  
  37.  
  38.                parameters are separated by commas, and are processed
  39.  
  40.  
  41.                left to right.
  42.  
  43.  
  44.  
  45.                    All listed options change the standard MAC.68K
  46.  
  47.  
  48.                options. The inverse options are provided for use with
  49.  
  50.  
  51.                customized versions.
  52.  
  53.  
  54.  
  55.       Option                  Description
  56.  
  57.  
  58.     (Inverse Option)
  59.  
  60.  
  61.  
  62.      CREF          Generate symbol cross references by page and line
  63.  
  64.  
  65.      (NOCREF)      number. Automatically forces SYMBOL option.
  66.  
  67.  
  68.  
  69.      LABELS        Allow symbol names longer than eight characters,
  70.  
  71.  
  72.                    with only the first eight being significant.
  73.  
  74.  
  75.  
  76.      NOLIST        Disable program listing. Overrides any LIST  L cards.
  77.  
  78.  
  79.  
  80.      NOOBJ         Do not generate an object file.
  81.  
  82.  
  83.  
  84.      NOPAGE        Do not generate page headings on the output file.
  85.  
  86.  
  87.  
  88.      NOPAWS        Do not pause for keyboard input on a console page
  89.  
  90.  
  91.                    full.
  92.  
  93.  
  94.  
  95.      SAM           Use SAM opcode and operand syntax. (Appendix D & E).
  96.  
  97.  
  98.  
  99.      SEQ           List sequence numbers on the output file.
  100.  
  101.  
  102.      (NOSEQ)
  103.  
  104.  
  105.  
  106.      SEQNAM        List source line sequence names on the output file.
  107.  
  108.  
  109.  
  110.      SUBTTL        Insert subtitle lines on the output file.
  111.  
  112.  
  113.  
  114.      SYMBOLS       List the symbol table on the output file.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124. MAC.68K                                  -52-
  125.  
  126.  
  127.  
  128. MAC.68K
  129.  
  130.  
  131.  
  132.  
  133.  
  134.      LOWER         Treat lower case alphabetic characters as unique
  135.  
  136.  
  137.      (UPPER)       characters within symbol names.
  138.  
  139.  
  140.  
  141.      WRAP          Use two lines to list an 80+ character output line
  142.  
  143.  
  144.      (NOWRAP)      to an 80 column output device.
  145.  
  146.  
  147.  
  148.      REL           Generate a .O reloactable file.
  149.  
  150.  
  151.      (68K)
  152.  
  153.  
  154.  
  155.  
  156.  
  157.   EXAMPLE              OPTION  UPPER,CREF
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                               -53-                              MAC.68K
  207.  
  208.  
  209.  
  210.                                                                 MAC.68K
  211.  
  212.  
  213.  
  214.  
  215.  
  216.                                 ORG
  217.                                 ORG
  218.                                 ORG
  219.  
  220.  
  221.  
  222.  
  223.  
  224.   PURPOSE         To reset the origin counter.
  225.  
  226.  
  227.  
  228.  
  229.  
  230.   FORMAT               ORG    expression
  231.  
  232.  
  233.  
  234.  
  235.  
  236.   DESCRIPTION     The origin counter controls where the assembled
  237.  
  238.  
  239.                instructions and data are to be stored in the object
  240.  
  241.  
  242.                file. The origin counter starts at the load address
  243.  
  244.  
  245.                for .68K object files and is automatically advanced
  246.  
  247.  
  248.                for each instruction or data field. A programmer
  249.  
  250.  
  251.                ordinarily does not need to change this value. Any
  252.  
  253.  
  254.                symbols used in the expression must be previously
  255.  
  256.  
  257.                defined.
  258.  
  259.  
  260.  
  261.                    The origin counter may be set forward or backward.
  262.  
  263.  
  264.                It may not be set below the load address (see IDENT).
  265.  
  266.  
  267.                Caution should be used in setting the counter backward
  268.  
  269.  
  270.                as you may inadvertently overlay (and lose) previously
  271.  
  272.  
  273.                generated code.
  274.  
  275.  
  276.  
  277.                    The current value of the origin counter may be
  278.  
  279.  
  280.                referenced by using *O.  ORG also sets the location
  281.  
  282.  
  283.                counter to the new origin address.
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314. MAC.68K                                  -54-
  315.  
  316.  
  317.  
  318. MAC.68K
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                 PAGE
  325.                                 PAGE
  326.                                 PAGE
  327.  
  328.  
  329.  
  330.  
  331.   PURPOSE         To advance to the next page on the output list file.
  332.  
  333.  
  334.  
  335.                   To change listing page length and/or page width.
  336.  
  337.  
  338.  
  339.  
  340.   FORMAT               PAGE   length,width
  341.  
  342.  
  343.  
  344.              subhead   PAGE
  345.  
  346.  
  347.  
  348.  
  349.   DESCRIPTION     PAGE forces a new page on the list device. The sub
  350.  
  351.  
  352.                heading in page heading line 2 is reset with the
  353.  
  354.  
  355.                subhead value. Note that a null field blanks out the
  356.  
  357.  
  358.                current subhead value.
  359.  
  360.  
  361.  
  362.                    The PAGE is ignored if it is in a block of code
  363.  
  364.  
  365.                that is not being listed:  e.g., if it appears in a
  366.  
  367.  
  368.                macro then macro expansion listing must be enabled for
  369.  
  370.  
  371.                the new page to take effect.
  372.  
  373.  
  374.  
  375.                    When used as an initialization directive, PAGE can
  376.  
  377.  
  378.                set the output line width within a range of 80 to 132,
  379.  
  380.  
  381.                and or set the output page length within a range of 14
  382.  
  383.  
  384.                to 80.
  385.  
  386.  
  387.  
  388.  
  389.   EXAMPLE              PAGE     ,132
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.                                PURGE
  397.                                PURGE
  398.                                PURGE
  399.  
  400.  
  401.  
  402.  
  403.   PURPOSE         To remove a macro definition.
  404.  
  405.  
  406.  
  407.  
  408.   FORMAT               PURGE  macroname
  409.  
  410.  
  411.  
  412.  
  413.   DESCRIPTION     PURGE logically deletes an operation code, a pseudo
  414.  
  415.  
  416.                operation code, or a macro name. An attempt to
  417.  
  418.  
  419.                redefine a macro without first using PURGE results in
  420.  
  421.  
  422.                a warning in the form of a source line error code type
  423.  
  424.  
  425.                3. Note that this is a warning only, and that the
  426.  
  427.  
  428.                second definition is valid.
  429.  
  430.  
  431.  
  432.  
  433.   EXAMPLE              PURGE    TESTMAC
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.                               -55-                              MAC.68K
  443.  
  444.  
  445.  
  446.                                                                 MAC.68K
  447.  
  448.  
  449.  
  450.  
  451.  
  452.                                 QUAL
  453.                                 QUAL
  454.                                 QUAL
  455.  
  456.  
  457.  
  458.  
  459.  
  460.   PURPOSE         To change the default symbol qualifier.
  461.  
  462.  
  463.  
  464.  
  465.  
  466.   FORMAT               QUAL   qualname
  467.  
  468.  
  469.  
  470.              strname   QUAL   qualname
  471.  
  472.  
  473.  
  474.                        QUAL   *
  475.  
  476.  
  477.  
  478.  
  479.  
  480.   DESCRIPTION     Symbol names are by default unqualified and may be
  481.  
  482.  
  483.                referenced globally simply by using their name. QUAL
  484.  
  485.  
  486.                establishes for a block of code a qualname by which
  487.  
  488.  
  489.                all symbols within the QUAL block are qualified.
  490.  
  491.  
  492.                Outside of this block the qualified symbols are
  493.  
  494.  
  495.                referenced by using /qualname/symbol.  Within the
  496.  
  497.  
  498.                block the qualified symbol names can be used without
  499.  
  500.  
  501.                the /qualname/ prefix. A symbol referenced within the
  502.  
  503.  
  504.                block is first sought in the list of names with the
  505.  
  506.  
  507.                same qualifier and then among the global symbol names.
  508.  
  509.  
  510.                To force a reference to a global symbol from within a
  511.  
  512.  
  513.                QUAL block use // (the global symbol qualifier) before
  514.  
  515.  
  516.                the symbol name. E.g., //symbol.
  517.  
  518.  
  519.  
  520.                    Up to 25 unique QUAL names may be used within one
  521.  
  522.  
  523.                assembly, and a 20 deep stack is used to store the
  524.  
  525.  
  526.                previous qualname whenever a QUAL appears.  This
  527.  
  528.  
  529.                allows sections of code using QUALs to be nested
  530.  
  531.  
  532.                without any one section having to be aware of the
  533.  
  534.  
  535.                order or names of the prior QUALs. At the end of each
  536.  
  537.  
  538.                section, a QUAL * restores the prior QUAL level. The
  539.  
  540.  
  541.                optional strname in the location field of a QUAL is a
  542.  
  543.  
  544.                string name that is assigned the value of the qualname
  545.  
  546.  
  547.                in effect at the time of the QAUL.
  548.  
  549.  
  550.  
  551.  
  552.  
  553.   EXAMPLES
  554.  
  555.  
  556.                 QUAL    RECORDA
  557.  
  558.  
  559.                 LOC     0
  560.  
  561.  
  562.         STATE   DS      1
  563.  
  564.  
  565.         SALES   DS.L    1
  566.  
  567.  
  568.         ITEMS   DS.B    //NITEMS
  569.  
  570.  
  571.                 LOC     *O
  572.  
  573.  
  574.                 QUAL    *
  575.  
  576.  
  577.  
  578.                 LEA     BUFFER(PC),A1
  579.  
  580.  
  581.                  :
  582.  
  583.  
  584.                 MOVE.L  /RECORDA/SALES(A1),D1
  585.  
  586.  
  587.  
  588.  
  589.  
  590. MAC.68K                                  -56-
  591.  
  592.  
  593.  
  594. MAC.68K
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                               SECTION
  601.                               SECTION
  602.                               SECTION
  603.  
  604.  
  605.  
  606.  
  607.   PURPOSE         To change the assembly to another segment.
  608.  
  609.  
  610.  
  611.  
  612.   FORMAT               SECTION  section number
  613.  
  614.  
  615.  
  616.  
  617.   DESCRIPTION     SECTION changes the assembly to another segment.
  618.  
  619.  
  620.                Three values are allowed for the section number.
  621.  
  622.  
  623.                Section zero is the TEXT segment, section 14 is the
  624.  
  625.  
  626.                DATA segment, and section 15 is the BSS segment.
  627.  
  628.  
  629.                SECTION is an alternate form of the TEXT, DATA, or BSS
  630.  
  631.  
  632.                op codes.
  633.  
  634.  
  635.  
  636.  
  637.   EXAMPLE              SECTION    #14
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.                                 SEG
  648.                                 SEG
  649.                                 SEG
  650.  
  651.  
  652.  
  653.  
  654.   PURPOSE         To write out the current object file buffer.
  655.  
  656.  
  657.  
  658.  
  659.   FORMAT               SEG
  660.  
  661.  
  662.  
  663.  
  664.   DESCRIPTION     SEG is only allowed when generating a .68K object
  665.  
  666.  
  667.                file that does not contain any DATA or BSS sections.
  668.  
  669.  
  670.                It is designed to allow very large assemblies on small
  671.  
  672.  
  673.                memory machines.  SEG writes out any accumulated
  674.  
  675.  
  676.                object data and resets the internal buffer pointers.
  677.  
  678.  
  679.                This reduces the pass two table space requirements
  680.  
  681.  
  682.                (see section VIII.) for object file space.
  683.  
  684.  
  685.  
  686.                    You may not ORG backwards past a SEG address.
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.                               -57-                              MAC.68K
  705.  
  706.  
  707.  
  708.                                                                 MAC.68K
  709.  
  710.  
  711.  
  712.  
  713.  
  714.                                 SET
  715.                                 SET
  716.                                 SET
  717.  
  718.  
  719.  
  720.  
  721.  
  722.   PURPOSE         To define or change the value of a redefinable
  723.  
  724.  
  725.                symbol.
  726.  
  727.  
  728.  
  729.  
  730.  
  731.   FORMAT     symbol    SET    expression
  732.  
  733.  
  734.  
  735.  
  736.  
  737.   DESCRIPTION     SET defines a new value for its location field
  738.  
  739.  
  740.                symbol. SET may only change the value of symbols
  741.  
  742.  
  743.                defined by SET, MAX, MIN or STRLEN.  Any symbol used
  744.  
  745.  
  746.                in the expression must be previously defined. If an
  747.  
  748.  
  749.                error is detected the symbol retains its previous
  750.  
  751.  
  752.                value (if any).
  753.  
  754.  
  755.  
  756.  
  757.  
  758.   EXAMPLE    ENTRIES   SET    1
  759.  
  760.  
  761.              ENTRIES   SET    ENTRIES+1
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798. MAC.68K                                  -58-
  799.  
  800.  
  801. RIES+1
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.